<?php
if(session::user() && session::user()->hasRole('ADMIN'))
{
   $SMARTY->assign('tree', $TREE->getTree(1));

   $layout = 'manage.html';
} else
{
   if (session::user())
   {
      $ErrorHandler->setError(
              array(
                  'code' => 'access',
                  'varkey' => 'access_denied'
              )
      );
   }
   $layout = 'login.html';
}